<template>
    <section id="counterSection">
      <div class="container">
        <div class="row">
          <div class="col-lg-12 col-md-12">
            <div class="counter-area">
                <smallAchieve v-for="data in datas" :key="data">
                    <template slot="a">
                        <slot>{{data.number}}</slot>
                    </template>
                    <template slot="b">
                        <slot>{{data.name}}</slot>
                    </template>
                </smallAchieve>
            </div>
          </div>
        </div>
      </div>
    </section>
</template>

<script>
import smallAchieve from './publicChild/smallAchieve'
export default {
  data () {
    return {
      datas: [
        new this.ContributeObject('200', '累计用户量'),
        new this.ContributeObject('300', '累计发单量'),
        new this.ContributeObject('350', '公众号人数'),
        new this.ContributeObject('450', '触达人数')
      ]
    }
  },
  methods: {
    ContributeObject (number, name) {
      this.number = number
      this.name = name
    }
  },
  components: {
    smallAchieve
  }
}
</script>
